package com.ev.mes.vo;

import com.ev.common.domain.PageModel;
import com.ev.framework.utils.StringUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 文件名称： com.ev.mes.vo.java</br>
 * 初始作者： ev-monitor</br>
 * 创建日期： 2020-08-06 10:31:52</br>
 * 功能说明： 排班计划主表参数 <br/>
 * =================================================<br/>
 * 修改记录：<br/>
 * 修改作者        日期       修改内容<br/>
 * ================================================<br/>
 * Copyright (c) 2020-2021 .All rights reserved.<br/>
 */
@Data
@ApiModel(value = "排班计划主表参数")
@EqualsAndHashCode(callSuper = false)
public class CrewSchedulingPageParam extends PageModel {
    @ApiModelProperty(value = "设备名称（模糊）")
    private String deviceName;

    @ApiModelProperty(value = "班制Id")
    private String shiftId;

    //开始时间
    @ApiModelProperty(value = "开始时间", example = "2020-08-06 10:31:52")
    private String startTime;
    //停止时间
    @ApiModelProperty(value = "停止时间", example = "2020-08-06 10:31:52")
    private String endTime;

    public void setDeviceName(String deviceName) {
        this.deviceName = StringUtils.sqlLike(deviceName);
    }

    public void setShiftId(String shiftId) {
        if (StringUtils.isEmpty(shiftId)){
            return;
        }
        this.shiftId = "%," + shiftId + ",%";
    }
}
